const Router = require("koa-router");
const uploadController = require("../controllers/uploadController");
const router = new Router({
    prefix: '/api', // 👈 所有路由自动加 /api 前缀
});

// 创建文件夹
router.post('/createFolder', uploadController.createFolder);
// 删除文件夹
router.post('/deleteFolder', uploadController.deleteFolder);
// 获取文件夹列表
router.get('/getFolderList', uploadController.getFolderList);
// 获取文件列表
router.get('/getFileList', uploadController.getFileList);

// 上传pdf
router.post('/uploadpdf', uploadController.uploadPdf);

// 处理文件夹
router.post('/runPyForPdfToImg', uploadController.runPyForPdfToImg);

// 获取图片资源列表
router.get('/getImgList', uploadController.getImgList);
// 修改图片状态
router.post('/changeImgStatus', uploadController.changeImgStatus);

module.exports = router;